home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / CIncludes / DiskInit.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  4.2 KB  |  160 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        DiskInit.h
  3.  
  4.      Contains:    Disk Initialization Package ('PACK' 2) Interfaces.
  5.  
  6.      Version:    Technology:    System 8.1
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1985-1995, 1997-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __DISKINIT__
  18. #define __DISKINIT__
  19.  
  20. #ifndef __MACTYPES__
  21. #include <MacTypes.h>
  22. #endif
  23.  
  24.  
  25.  
  26. #if PRAGMA_ONCE
  27. #pragma once
  28. #endif
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. #if PRAGMA_IMPORT
  35. #pragma import on
  36. #endif
  37.  
  38. #if PRAGMA_STRUCT_ALIGN
  39.     #pragma options align=mac68k
  40. #elif PRAGMA_STRUCT_PACKPUSH
  41.     #pragma pack(push, 2)
  42. #elif PRAGMA_STRUCT_PACK
  43.     #pragma pack(2)
  44. #endif
  45.  
  46.  
  47. struct HFSDefaults {
  48.     char                             sigWord[2];                    /* signature word */
  49.     long                             abSize;                        /* allocation block size in bytes */
  50.     long                             clpSize;                    /* clump size in bytes */
  51.     long                             nxFreeFN;                    /* next free file number */
  52.     long                             btClpSize;                    /* B-Tree clump size in bytes */
  53.     short                             rsrv1;                        /* reserved */
  54.     short                             rsrv2;                        /* reserved */
  55.     short                             rsrv3;                        /* reserved */
  56. };
  57. typedef struct HFSDefaults                HFSDefaults;
  58.  
  59. enum {
  60.     kHFSPlusDefaultsVersion        = 1
  61. };
  62.  
  63.  
  64. struct HFSPlusDefaults {
  65.     UInt16                             version;                    /* version of this structure */
  66.     UInt16                             flags;                        /* currently undefined; pass zero */
  67.     UInt32                             blockSize;                    /* allocation block size in bytes */
  68.     UInt32                             rsrcClumpSize;                /* clump size for resource forks */
  69.     UInt32                             dataClumpSize;                /* clump size for data forks */
  70.     UInt32                             nextFreeFileID;                /* next free file number */
  71.     UInt32                             catalogClumpSize;            /* clump size for catalog B-tree */
  72.     UInt32                             catalogNodeSize;            /* node size for catalog B-tree */
  73.     UInt32                             extentsClumpSize;            /* clump size for extents B-tree */
  74.     UInt32                             extentsNodeSize;            /* node size for extents B-tree */
  75.     UInt32                             attributesClumpSize;        /* clump size for attributes B-tree */
  76.     UInt32                             attributesNodeSize;            /* node size for attributes B-tree */
  77.     UInt32                             allocationClumpSize;        /* clump size for allocation bitmap file */
  78. };
  79. typedef struct HFSPlusDefaults            HFSPlusDefaults;
  80.  
  81. EXTERN_API( void )
  82. DILoad                            (void)                                                        THREEWORDINLINE(0x7002, 0x3F00, 0xA9E9);
  83.  
  84. EXTERN_API( void )
  85. DIUnload                        (void)                                                        THREEWORDINLINE(0x7004, 0x3F00, 0xA9E9);
  86.  
  87. EXTERN_API( short )
  88. DIBadMount                        (Point                     where,
  89.                                  UInt32                 evtMessage)                            THREEWORDINLINE(0x7000, 0x3F00, 0xA9E9);
  90.  
  91. EXTERN_API( OSErr )
  92. DIFormat                        (short                     drvNum)                                THREEWORDINLINE(0x7006, 0x3F00, 0xA9E9);
  93.  
  94. EXTERN_API( OSErr )
  95. DIVerify                        (short                     drvNum)                                THREEWORDINLINE(0x7008, 0x3F00, 0xA9E9);
  96.  
  97. EXTERN_API( OSErr )
  98. DIZero                            (short                     drvNum,
  99.                                  ConstStr255Param         volName)                            THREEWORDINLINE(0x700A, 0x3F00, 0xA9E9);
  100.  
  101. /*
  102.     DIXFormat, DIXZero, and DIReformat are only available when FSM (File System Manager) is installed.
  103.     FSM is part of Macintosh PC Exchange and System 7.5.
  104. */
  105. EXTERN_API( OSErr )
  106. DIXFormat                        (short                     drvNum,
  107.                                  Boolean                 fmtFlag,
  108.                                  unsigned long             fmtArg,
  109.                                  unsigned long *        actSize)                            THREEWORDINLINE(0x700C, 0x3F00, 0xA9E9);
  110.  
  111. EXTERN_API( OSErr )
  112. DIXZero                            (short                     drvNum,
  113.                                  ConstStr255Param         volName,
  114.                                  short                     fsid,
  115.                                  short                     mediaStatus,
  116.                                  short                     volTypeSelector,
  117.                                  unsigned long             volSize,
  118.                                  void *                    extendedInfoPtr)                    THREEWORDINLINE(0x700E, 0x3F00, 0xA9E9);
  119.  
  120. EXTERN_API( OSErr )
  121. DIReformat                        (short                     drvNum,
  122.                                  short                     fsid,
  123.                                  ConstStr255Param         volName,
  124.                                  ConstStr255Param         msgText)                            THREEWORDINLINE(0x7010, 0x3F00, 0xA9E9);
  125.  
  126.  
  127. #if CGLUESUPPORTED
  128. EXTERN_API_C( OSErr )
  129. dibadmount                        (Point *                where,
  130.                                  long                     evtMessage);
  131.  
  132. EXTERN_API_C( OSErr )
  133. dizero                            (short                     drvnum,
  134.                                  const char *            volName);
  135.  
  136. #endif  /* CGLUESUPPORTED */
  137.  
  138.  
  139.  
  140. #if PRAGMA_STRUCT_ALIGN
  141.     #pragma options align=reset
  142. #elif PRAGMA_STRUCT_PACKPUSH
  143.     #pragma pack(pop)
  144. #elif PRAGMA_STRUCT_PACK
  145.     #pragma pack()
  146. #endif
  147.  
  148. #ifdef PRAGMA_IMPORT_OFF
  149. #pragma import off
  150. #elif PRAGMA_IMPORT
  151. #pragma import reset
  152. #endif
  153.  
  154. #ifdef __cplusplus
  155. }
  156. #endif
  157.  
  158. #endif /* __DISKINIT__ */
  159.  
  160.